package com.example.tiaozhuang;

import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import java.util.Timer;
import java.util.TimerTask;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

         new Timer().schedule(new TimerTask() {
             @Override
             public void run() {
               startActivity(new Intent(MainActivity.this,Main2Activity.class));
                 finish();
             }
         },1000);

         SharedPreferences sharedPreferences=getSharedPreferences("sha",MODE_APPEND);
        SharedPreferences.Editor editor=sharedPreferences.edit();
        editor.putBoolean("f",true);
        editor.commit();
    }



}
